package demo;

import java.util.Scanner;

public class Demo01 {
    public static void main(String[] args) {
        Invocation();

    }
    public static void Invocation(){
        Scanner scan = new Scanner(System.in);
        while (true) {
            System.out.print("请输入1~5之间的整数:");
            int num = scan.nextInt();
            if (num == 1){
                System.out.println("你输入的数字是1");
            }else if (num == 2){
                System.out.println("你输入的数字是2");
            }else if (num == 3){
                System.out.println("你输入的数字是3");
            }else if (num == 4){
                System.out.println("你输入的数字是4");
            }else if (num == 5){
                System.out.println("感谢使用~");
                break;
            }else {
                System.out.println("你输入的数字有误,请重新输入");
            }
        }

    }
}
